﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SQLServerDAL;
using Model;
using System.Data;
namespace BLL
{
    public class UserBLL
    {
        public static int AddUser(Users user)
        {
            UserDal ud = new UserDal();
            return ud.AddUser(user);
        }
        public static int DeleteUser(string userid)
        {
            UserDal ud = new UserDal();
            return ud.DeleteUser(userid);
        }
        public static int UpdateUser(Users user)
        {
            UserDal ud = new UserDal();
            return ud.UpdateUser(user);
        }
        public static DataTable GetAllUser()
        {
            UserDal ud = new UserDal();
            return ud.GetAllUser();
        }

        public static DataTable LoginUser(string username, string password)
        {
            UserDal ud = new UserDal();
            return ud.GetUser(username, password);

        }
        public static int GetUser(string username)
        {
            UserDal ud = new UserDal();
            return ud.GetUser(username);
        }
        public static DataTable GetUser(string username, string password)
        {
            UserDal ud = new UserDal();
            return ud.GetUser(username, password);
        }
        public static DataTable GetUserByName(string username)
        {
            UserDal ud = new UserDal();
            return ud.GetUserByName(username);
        }
    }
}
